using UnityEngine;

public class FBLikeButton : MonoBehaviour
{
	public Color activeColor = Color.white;

	public Color disabledColor = Color.gray;

	public UILabel ballText;

	public UISprite bckSprite;

	private void Awake()
	{
		ballText.text = "+" + GGPlayerSettings.instance.walletManager.CoinsForLike();
	}

	private void OnEnable()
	{
		Update();
	}

	public void OnClick()
	{
		GGSupportMenu.instance.showFacebookLike();
		NavigationManager.instance.Pop();
	}

	public void Update()
	{
		bool flag = !GGPlayerSettings.instance.Model.playerLikedFacebookPage;
		base.gameObject.SetActive(flag);
		bckSprite.color = ((!flag) ? disabledColor : activeColor);
	}
}
